# Filename: str_method.py

name = 'Swaroop' # This is a string object

if name.startswith('Swa'):
    print ('Yes, the string sratr with "Swa"')

if 'a' in name:
    print ('Yes, it contains the string "a"')

if name.find('war') != -1 :
    print ('Yes, it contains the string "WAR"')

delimiter = '_*_'
mylist = ['Brazil', 'Russia', 'India', 'China']
print delimiter.join(mylist)

if name.rfind('s') != -1:
    print 'is right'
else:
    print ('is wrong')

name2 = name.replace('S', 'W')
print ('the new name is %s ' % name2)


low_name = name.lower()
print 'low string is %s' % low_name

fill_name = name.zfill(10)
print 'fill name is %s ' % fill_name
